<?php
	$_nav='info';
	$_title='资讯';
	include_once 'head.php';
	if($user_id==''){
		header('Location: login.php');
	}
	$my_label='collect';
	$smarty->assign('my_label',$my_label);	
	$infoc=new info();

	//收藏的资讯
	$key="c.*,from_unixtime(c.create_time,'%Y-%m-%d') as createTime,i.title";
	$num=20;
	$collects=$infoc->infoCollectList($key,$num);
	$smarty->assign('collects',$collects['result']);
	$smarty->assign('page',$collects['page']);

	if($_GET['action']=='del'){
		$cid=$_POST['cid'];			//收藏id
		$res=$infoc->collectDel($cid);
		echo $res;
		exit();
	}

	$smarty->assign('row',$row['result']);
	$smarty->display("my_collect_info.html");
?>